CXXFLAGS= -time -O3 -DNDEBUG

# Create a list of source files.
SOURCES = 	$(shell ls src/*.cpp)
TARGET	=	$(shell basename `pwd`)
OBJECTS =	$(SOURCES:%.cpp=%.o)
LIBS	+= -lbookgui	

all: $(TARGET)
$(OBJECTS): $(SOURCES)
$(TARGET): $(OBJECTS)	
		$(CXX) $(SOURCES) $(LIBS) `fltk-config --cxxflags --ldflags --use-images` -o $(TARGET)

clean:
		$(RM) $(OBJECTS) $(TARGET) $(TARGET).exe
				
.PHONY: all clean
